<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>log-陈科衡的博客</title>

  <!-- keywords -->
  
    <meta name="keywords" content="log">
  

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="kartjim&#96;s blog">
<meta property="og:type" content="website">
<meta property="og:title" content="陈科衡的博客">
<meta property="og:url" content="https://github.com/can-dy-jack/can-dy-jack.github.io/page/2/index.html">
<meta property="og:site_name" content="陈科衡的博客">
<meta property="og:description" content="kartjim&#96;s blog">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="Kart jim">
<meta property="article:tag" content="log">
<meta name="twitter:card" content="summary">
  
    <link rel="alternative" href="/atom.xml" title="陈科衡的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/logo.jpg">
  
  
<link rel="stylesheet" href="/css/style.css">

  
  

  
<script src="//cdn.bootcss.com/require.js/2.3.2/require.min.js"></script>

  
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>


  
      <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("n54fvATe6tx6CJx7XqpWsacb-gzGzoHsz", "3h43n4iW81varlSuI4gBfvIN");</script>

<script src="/js/Counter.js"></script>

  
<meta name="generator" content="Hexo 5.3.0"></head>
<body>
  <div id="container">
    <div id="particles-js"></div>
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="/img/202.jpg" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/"></a></h1>
		</hgroup>

		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						<div class="icon-wrap icon-link hide" data-idx="2">
							<div class="loopback_l"></div>
							<div class="loopback_r"></div>
						</div>
						
						
						<div class="icon-wrap icon-me hide" data-idx="3">
							<div class="user"></div>
							<div class="shoulder"></div>
						</div>
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>菜单</li>
						<li>标签</li>
						
						<li>友情链接</li>
						
						
						<li>关于我</li>
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">主页</a></li>
				        
							<li><a href="/archives">所有文章</a></li>
				        
							<li><a href="/tags/%E5%89%8D%E7%AB%AF">前端</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
								<a class="github" target="_blank" href="https://github.com/can-dy-jack" title="github">github</a>
					        
								<a class="zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
					        
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						<a href="/tags/TypeScript/" style="font-size: 10px;">TypeScript</a> <a href="/tags/andriod/" style="font-size: 12.5px;">andriod</a> <a href="/tags/css/" style="font-size: 10px;">css</a> <a href="/tags/default/" style="font-size: 10px;">default</a> <a href="/tags/first/" style="font-size: 12.5px;">first</a> <a href="/tags/hexo/" style="font-size: 12.5px;">hexo</a> <a href="/tags/html/" style="font-size: 12.5px;">html</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 12.5px;">javascript</a> <a href="/tags/kotlin/" style="font-size: 12.5px;">kotlin</a> <a href="/tags/post/" style="font-size: 10px;">post</a> <a href="/tags/simple/" style="font-size: 10px;">simple</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 17.5px;">前端</a> <a href="/tags/%E5%AE%98%E7%BD%91%E5%AD%A6%E4%B9%A0/" style="font-size: 15px;">官网学习</a> <a href="/tags/%E9%9A%8F%E7%AC%94/" style="font-size: 20px;">随笔</a>
					</div>
				</section>
				
				
				
				<section class="switch-part switch-part3">
					<div id="js-friends">
					
			          <a target="_blank" class="main-nav-link switch-friends-link" href="https://github.com/smackgg/hexo-theme-smackdown">smackdown</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://kartjim.gitee.io/kartpress">kartpress</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://moriafly.xyz">moriafly`web</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="https://github.com/can-dy-jack/jim">jim</a>
			        
			        </div>
				</section>
				

				
				
				<section class="switch-part switch-part4">
				
					<div id="js-aboutme">陈科衡，上海海洋大学在校生。</div>
				</section>
				
			</div>
		</div>
	</header>				
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide"></h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img lazy-src="/img/202.jpg" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author"></h1>
			</hgroup>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/archives">所有文章</a></li>
		        
					<li><a href="/tags/%E5%89%8D%E7%AB%AF">前端</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/can-dy-jack" title="github">github</a>
			        
						<a class="zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>
      <div class="body-wrap">
  
    <article id="post-标签插件" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/all/%E6%A0%87%E7%AD%BE%E6%8F%92%E4%BB%B6/" class="article-date">
  	<time datetime="2020-12-15T13:06:31.000Z" itemprop="datePublished">2020-12-15</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/all/%E6%A0%87%E7%AD%BE%E6%8F%92%E4%BB%B6/">
        标签插件
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="引用块"><a href="#引用块" class="headerlink" title="引用块"></a>引用块</h2><h3 id="在文章中插入引言，可包含作者、来源和标题。"><a href="#在文章中插入引言，可包含作者、来源和标题。" class="headerlink" title="在文章中插入引言，可包含作者、来源和标题。"></a>在文章中插入引言，可包含作者、来源和标题。</h3><p><strong><em>别号： quote</em></strong></p>
<blockquote>
<blockquote><p>content</p>
<footer><strong>[author[</strong><cite>source]] [link] [source_link_title]</cite></footer></blockquote>

</blockquote>
<p>如：</p>
<blockquote><p>Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.</p>
<footer><strong>David Levithan</strong><cite>Wide Awake</cite></footer></blockquote>
<blockquote><p>Every interaction is both precious and an opportunity to delight.</p>
<footer><strong>Seth Godin</strong><cite><a target="_blank" rel="noopener" href="http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html">Welcome to Island Marketing</a></cite></footer></blockquote>......
<h2 id="代码块"><a href="#代码块" class="headerlink" title="代码块"></a>代码块</h2><h3 id="在文章中插入代码。"><a href="#在文章中插入代码。" class="headerlink" title="在文章中插入代码。"></a>在文章中插入代码。</h3><p><em>别名： code</em><br>公式：</p>
<figure class="highlight plain"><figcaption><span>[title] [lang:language] [url] [link text] [additional options]</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">code snippet</span><br></pre></td></tr></table></figure>
<p>普通的代码块:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">alert(&#39;Hello World!&#39;);</span><br></pre></td></tr></table></figure>
<p>附加说明和网址：</p>
<figure class="highlight plain"><figcaption><span>_.compact</span><a target="_blank" rel="noopener" href="http://underscorejs.org/#compact">Underscore.js</a></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">_.compact([0, 1, false, 2, &#39;&#39;, 3]);</span><br><span class="line">&#x3D;&gt; [1, 2, 3]</span><br></pre></td></tr></table></figure>
<h2 id="引用文章"><a href="#引用文章" class="headerlink" title="引用文章"></a>引用文章</h2><h3 id="引用其他文章的链接。"><a href="#引用其他文章的链接。" class="headerlink" title="引用其他文章的链接。"></a>引用其他文章的链接。</h3>
<a href="#">Post not found: filename [title] [escape]</a>
<p>官网：<a href="https://hexo.io/zh-cn/docs/tag-plugins" title="" target="">Hexo 3.8.0</a></p>
<h2 id="引用资源"><a href="#引用资源" class="headerlink" title="引用资源"></a>引用资源</h2><h3 id="引用文章的资源。"><a href="#引用文章的资源。" class="headerlink" title="引用文章的资源。"></a>引用文章的资源。</h3>



<h3 id="反引号代码块"><a href="#反引号代码块" class="headerlink" title="反引号代码块"></a>反引号代码块</h3><h4 id="另一种形式的代码块，不同的是它使用三个反引号来包裹。"><a href="#另一种形式的代码块，不同的是它使用三个反引号来包裹。" class="headerlink" title="另一种形式的代码块，不同的是它使用三个反引号来包裹。"></a>另一种形式的代码块，不同的是它使用三个反引号来包裹。</h4><p><code>[language] [title] [url] [link text] code snippet</code></p>
<h2 id="文章摘要和截断"><a href="#文章摘要和截断" class="headerlink" title="文章摘要和截断"></a>文章摘要和截断</h2><h4 id="文章来自："><a href="#文章来自：" class="headerlink" title="文章来自："></a>文章来自：<a href="https://hexo.io/zh-cn/docs/tag-plugins" title="" target="">Hexo 3.8.0</a></h4>
      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AE%98%E7%BD%91%E5%AD%A6%E4%B9%A0/" rel="tag">官网学习</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      

      
        
<div class="counter-tag counter">
    <span id="/all/%E6%A0%87%E7%AD%BE%E6%8F%92%E4%BB%B6/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="标签插件">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-分类-12.15" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/hexo/%E5%88%86%E7%B1%BB-12.15/" class="article-date">
  	<time datetime="2020-12-15T12:45:25.000Z" itemprop="datePublished">2020-12-15</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/hexo/%E5%88%86%E7%B1%BB-12.15/">
        分类
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="分类方法的分歧"><a href="#分类方法的分歧" class="headerlink" title="分类方法的分歧"></a>分类方法的分歧</h3><p>如果您有过使用 WordPress 的经验，就很容易误解 Hexo 的分类方式。WordPress 支持对一篇文章设置多个分类，而且这些分类可以是同级的，也可以是父子分类。但是 Hexo 不支持指定多个同级分类。下面的指定方法：</p>
<blockquote>
<p>categories:<br>    - Diary<br>    - Life</p>
</blockquote>
<p>会使分类<code>Life</code>成为<code>Diary</code>的子分类，而不是并列分类。因此，有必要为您的文章选择尽可能准确的分类。</p>
<h4 id="如果你需要为文章添加多个分类，可以尝试以下-list-中的方法。"><a href="#如果你需要为文章添加多个分类，可以尝试以下-list-中的方法。" class="headerlink" title="如果你需要为文章添加多个分类，可以尝试以下 list 中的方法。"></a>如果你需要为文章添加多个分类，可以尝试以下 list 中的方法。</h4><blockquote>
<p>categories:<br>    - [Diary, PlayStation]<br>    - [Diary, Games]<br>    - [Life]</p>
</blockquote>
<p>此时这篇文章同时包括三个分类： <code>PlayStation</code> 和 <code>Games</code> 分别都是父分类 <code>Diary</code> 的子分类，同时 Life 是一个没有子分类的分类。</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AE%98%E7%BD%91%E5%AD%A6%E4%B9%A0/" rel="tag">官网学习</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/hexo/">hexo</a><a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a><a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/categories/">categories</a><a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/tags/">tags</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/hexo/%E5%88%86%E7%B1%BB-12.15/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="分类">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-JAVA实例01-九九乘法表" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/java/JAVA%E5%AE%9E%E4%BE%8B01-%E4%B9%9D%E4%B9%9D%E4%B9%98%E6%B3%95%E8%A1%A8/" class="article-date">
  	<time datetime="2020-12-14T10:39:42.000Z" itemprop="datePublished">2020-12-14</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/java/JAVA%E5%AE%9E%E4%BE%8B01-%E4%B9%9D%E4%B9%9D%E4%B9%98%E6%B3%95%E8%A1%A8/">
        JAVA实例01-九九乘法表
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="JAVA实例01"><a href="#JAVA实例01" class="headerlink" title="JAVA实例01"></a>JAVA实例01</h1><h2 id="——九九乘法表"><a href="#——九九乘法表" class="headerlink" title="——九九乘法表"></a>——九九乘法表</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Test01</span> </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[] args)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">for</span>(<span class="keyword">int</span> i=<span class="number">1</span>;i&lt;=<span class="number">9</span>;i++) &#123;</span><br><span class="line">            <span class="keyword">for</span>(<span class="keyword">int</span> j=<span class="number">1</span>;j&lt;=i;j++) </span><br><span class="line">            &#123;</span><br><span class="line">                System.out.print(j+<span class="string">&quot;×&quot;</span>+i+<span class="string">&quot;=&quot;</span>+i*j+<span class="string">&quot;\t&quot;</span>);</span><br><span class="line">            &#125;</span><br><span class="line">            System.out.println();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>运算结果：</p>
<blockquote>
<p>1×1=1<br>1×2=2   2×2=4<br>1×3=3   2×3=6   3×3=9<br>1×4=4   2×4=8   3×4=12  4×4=16<br>1×5=5   2×5=10  3×5=15  4×5=20  5×5=25<br>1×6=6   2×6=12  3×6=18  4×6=24  5×6=30  6×6=36<br>1×7=7   2×7=14  3×7=21  4×7=28  5×7=35  6×7=42  7×7=49<br>1×8=8   2×8=16  3×8=24  4×8=32  5×8=40  6×8=48  7×8=56  8×8=64<br>1×9=9   2×9=18  3×9=27  4×9=36  5×9=45  6×9=54  7×9=63  8×9=72  9×9=81</p>
</blockquote>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/java/" rel="tag">java</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/simple/" rel="tag">simple</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/java/">java</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/java/JAVA%E5%AE%9E%E4%BE%8B01-%E4%B9%9D%E4%B9%9D%E4%B9%98%E6%B3%95%E8%A1%A8/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="JAVA实例01-九九乘法表">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-time" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E9%9A%8F%E7%AC%94/time/" class="article-date">
  	<time datetime="2020-12-13T11:58:55.000Z" itemprop="datePublished">2020-12-13</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E9%9A%8F%E7%AC%94/time/">
        time
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>…….</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/time/" rel="tag">time</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E9%9A%8F%E7%AC%94/time/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="time">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-HTML5文档的基本结构及创建方法" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E5%89%8D%E7%AB%AF/HTML5%E6%96%87%E6%A1%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%BB%93%E6%9E%84%E5%8F%8A%E5%88%9B%E5%BB%BA%E6%96%B9%E6%B3%95/" class="article-date">
  	<time datetime="2020-12-13T02:22:57.000Z" itemprop="datePublished">2020-12-13</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E5%89%8D%E7%AB%AF/HTML5%E6%96%87%E6%A1%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%BB%93%E6%9E%84%E5%8F%8A%E5%88%9B%E5%BB%BA%E6%96%B9%E6%B3%95/">
        HTML5文档的基本结构及创建方法
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="HTML5文档基本结构"><a href="#HTML5文档基本结构" class="headerlink" title="HTML5文档基本结构"></a>HTML5文档基本结构</h1><h2 id="大纲"><a href="#大纲" class="headerlink" title="大纲"></a>大纲</h2><p>如果用专门的软件新建一个html文档，会自动出现以下大纲，这是HTML5的基本结构。这些是必须要写的内容。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!doctype <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">title</span>&gt;</span>标题<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">h1</span>&gt;</span>一级标题<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line">这里填写具体文本内容</span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="说明"><a href="#说明" class="headerlink" title="说明"></a>说明</h2><!doctype html><p>是文档类型说明，相对于其它HTML标准，标准5的文档类型说明是相对简单的！</p>
<h1 id="html文件的创建"><a href="#html文件的创建" class="headerlink" title="html文件的创建"></a>html文件的创建</h1><p>众所周知，HTML用普通的文本编辑器就可以编写，如Windows自带的记事本就可。<br>步骤：</p>
<ul>
<li>创建一个文件.txt，用记事本打开。</li>
<li>写好html代码之后选择另存为；</li>
<li>将文档后缀名改为.html或者.htm都可以，编码选择UTF-8；</li>
<li>保存好之后双击即可打开web查看；</li>
</ul>
<p>博客来自：<a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_46590483/article/details/106972610">纪大眼袋</a></p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/html/" rel="tag">html</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E5%89%8D%E7%AB%AF/HTML5%E6%96%87%E6%A1%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%BB%93%E6%9E%84%E5%8F%8A%E5%88%9B%E5%BB%BA%E6%96%B9%E6%B3%95/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="HTML5文档的基本结构及创建方法">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-网页学习-part01" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/%E7%BD%91%E9%A1%B5%E5%AD%A6%E4%B9%A0-part01/" class="article-date">
  	<time datetime="2020-12-12T14:55:14.000Z" itemprop="datePublished">2020-12-12</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/%E7%BD%91%E9%A1%B5%E5%AD%A6%E4%B9%A0-part01/">
        网页学习-part01
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>前端学习-part01</p>
<ul>
<li>HTML定义了网页的内容</li>
<li>CSS描述了网页的布局</li>
<li>JavaScript 制作网页的行为</li>
</ul>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/css/" rel="tag">css</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/html/" rel="tag">html</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/javascript/" rel="tag">javascript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a><a class="article-category-link" href="/categories/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E5%89%8D%E7%AB%AF/%E9%9A%8F%E7%AC%94/%E7%BD%91%E9%A1%B5%E5%AD%A6%E4%B9%A0-part01/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="网页学习-part01">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-常见的图片格式" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E9%9A%8F%E7%AC%94/%E5%9F%BA%E6%9C%AC%E5%B8%B8%E8%AF%86/%E5%B8%B8%E8%A7%81%E7%9A%84%E5%9B%BE%E7%89%87%E6%A0%BC%E5%BC%8F/" class="article-date">
  	<time datetime="2020-12-12T04:30:00.000Z" itemprop="datePublished">2020-12-12</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E9%9A%8F%E7%AC%94/%E5%9F%BA%E6%9C%AC%E5%B8%B8%E8%AF%86/%E5%B8%B8%E8%A7%81%E7%9A%84%E5%9B%BE%E7%89%87%E6%A0%BC%E5%BC%8F/">
        常见的图像文件格式
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="常见的图像文件格式"><a href="#常见的图像文件格式" class="headerlink" title="常见的图像文件格式"></a>常见的图像文件格式</h1><h2 id="PSD、PDD格式"><a href="#PSD、PDD格式" class="headerlink" title="PSD、PDD格式"></a>PSD、PDD格式</h2><p> PSD、PDD格式是PS自身专用文件格式；</p>
<h3 id="优点："><a href="#优点：" class="headerlink" title="优点："></a>优点：</h3><ul>
<li>能够保存图像数据的细小部分；</li>
<li>PS打开快</li>
<li>能够支持从线图到CMYK的所有图像类型；<h3 id="缺点："><a href="#缺点：" class="headerlink" title="缺点："></a>缺点：</h3></li>
</ul>
<ul>
<li>文件容量大，所以占用内存大；</li>
</ul>
<ul>
<li>由于这两种格式在其他图像处理软件不能很好兼容，所以通用性不强；<h2 id="TIFF格式"><a href="#TIFF格式" class="headerlink" title="TIFF格式"></a>TIFF格式</h2>TIFF是标签图像格式；<h3 id="advantage："><a href="#advantage：" class="headerlink" title="advantage："></a>advantage：</h3></li>
<li>对于色彩通道图像友好；</li>
<li>具有很强的可移植性；<h3 id="drawback："><a href="#drawback：" class="headerlink" title="drawback："></a>drawback：</h3></li>
<li>结构要比其他格式复杂一点；<h2 id="GIF格式"><a href="#GIF格式" class="headerlink" title="GIF格式"></a>GIF格式</h2>动态图片格式；文件容量比较小，形成一种 8 bit 图形文件，所以可以用来缩短图形的加载时间；</li>
</ul>
<h2 id="JPEG格式"><a href="#JPEG格式" class="headerlink" title="JPEG格式"></a>JPEG格式</h2><p>个人觉得是最为常用的一种图形文件格式。<br>JPEG格式既是PS支持的格式，也是一个压缩格式中的“佼佼者”。<br>JPEG压缩比例很大，但相应的也会丢失部分数据。</p>
<h2 id="EPS格式"><a href="#EPS格式" class="headerlink" title="EPS格式"></a>EPS格式</h2><ul>
<li>可以用于Windows下几乎所有应用程序。</li>
<li>EPS格式使用索引色彩，具有丰富色彩。</li>
<li>还可以进行无损压缩。<h2 id="BMP格式"><a href="#BMP格式" class="headerlink" title="BMP格式"></a>BMP格式</h2>是Ai常用的文件格式，可以用来进行PS和Ai之间交换。<h2 id="PNG格式"><a href="#PNG格式" class="headerlink" title="PNG格式"></a>PNG格式</h2></li>
</ul>
<ul>
<li>压缩比例高，生成文件体积小。</li>
<li>支持透明色；<h1 id="图片格式的常用用途"><a href="#图片格式的常用用途" class="headerlink" title="图片格式的常用用途"></a>图片格式的常用用途</h1><h2 id="印刷：TIFF、EPS；"><a href="#印刷：TIFF、EPS；" class="headerlink" title="印刷：TIFF、EPS；"></a>印刷：TIFF、EPS；</h2><h2 id="Internet图像：GIF、JPEG、PNG；"><a href="#Internet图像：GIF、JPEG、PNG；" class="headerlink" title="Internet图像：GIF、JPEG、PNG；"></a>Internet图像：GIF、JPEG、PNG；</h2><h2 id="PS：PSD、PDD、TIFF；"><a href="#PS：PSD、PDD、TIFF；" class="headerlink" title="PS：PSD、PDD、TIFF；"></a>PS：PSD、PDD、TIFF；</h2></li>
</ul>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a><a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/%E5%9F%BA%E6%9C%AC%E5%B8%B8%E8%AF%86/">基本常识</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E9%9A%8F%E7%AC%94/%E5%9F%BA%E6%9C%AC%E5%B8%B8%E8%AF%86/%E5%B8%B8%E8%A7%81%E7%9A%84%E5%9B%BE%E7%89%87%E6%A0%BC%E5%BC%8F/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="常见的图像文件格式">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-kotlin-String" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/kotlin/kotlin-String/" class="article-date">
  	<time datetime="2020-12-11T14:41:05.000Z" itemprop="datePublished">2020-12-11</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/kotlin/kotlin-String/">
        kotlin-String
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="Kotlin-字符串"><a href="#Kotlin-字符串" class="headerlink" title="Kotlin - 字符串"></a>Kotlin - 字符串</h1><p>字符串只是一个字符串序列，包含在双引号中。在 Kotlin 中，字符串由类型 <code>String</code> 表示。它是实践中使用最广泛的数据类型之一。</p>
<h4 id="1-声明"><a href="#1-声明" class="headerlink" title="1. 声明"></a>1. 声明</h4><p>声明字符串变量：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str: String = <span class="string">&quot;Hello Kotlin&quot;</span></span><br></pre></td></tr></table></figure>
<p>当然，因为 Kotlin 出色的类型推断，您常常无需表明类型：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str = <span class="string">&quot;Hello Kotlin&quot;</span></span><br></pre></td></tr></table></figure>
<h4 id="2-字符串的长度"><a href="#2-字符串的长度" class="headerlink" title="2. 字符串的长度"></a>2. 字符串的长度</h4><p>您可以获取访问属性的字符串中的字符数。此属性具有类型的值。<code>length</code> <code>Int</code></p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> language = <span class="string">&quot;Kotlin&quot;</span></span><br><span class="line">println(language.length) <span class="comment">// 6</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">val</span> empty = <span class="string">&quot;&quot;</span></span><br><span class="line">println(empty.length) <span class="comment">// 0</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 关于汉字的长度</span></span><br><span class="line"><span class="keyword">val</span> str = <span class="string">&quot;你好&quot;</span></span><br><span class="line">println(str.length) <span class="comment">// 2</span></span><br></pre></td></tr></table></figure>
<h4 id="3-访问字符"><a href="#3-访问字符" class="headerlink" title="3. 访问字符"></a>3. 访问字符</h4><p>字符串的元素是单个字符，可以通过其索引访问。字符串的第一个元素具有索引 0 。</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> greeting = <span class="string">&quot;Hello&quot;</span></span><br><span class="line"> </span><br><span class="line"><span class="keyword">val</span> first = greeting[<span class="number">0</span>]  <span class="comment">// &#x27;H&#x27;</span></span><br><span class="line"><span class="keyword">val</span> second = greeting[<span class="number">1</span>] <span class="comment">// &#x27;e&#x27;</span></span><br><span class="line"><span class="keyword">val</span> five = greeting[<span class="number">4</span>]   <span class="comment">// &#x27;o&#x27;</span></span><br></pre></td></tr></table></figure>
<p>最后一个元素的索引等于字符串的长度减去 1 。对于字符串，最后一个元素为 。其索引为 4 ，因为字符串的长度为  5 。</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> last = greeting[greeting.length - <span class="number">1</span>] <span class="comment">// &#x27;o&#x27;</span></span><br><span class="line"><span class="keyword">val</span> prelast = greeting[greeting.length - <span class="number">2</span>] <span class="comment">// &#x27;l&#x27;</span></span><br></pre></td></tr></table></figure>
<p>Kotlin 提供了几种访问字符串的第一个字符和最后一个字符的便捷方法：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">println(greeting.first())   <span class="comment">// &#x27;H&#x27;</span></span><br><span class="line">println(greeting.last())    <span class="comment">// &#x27;o&#x27;</span></span><br><span class="line">println(greeting.lastIndex) <span class="comment">// 4</span></span><br></pre></td></tr></table></figure>
<p>您可以使用此功能编写更具可读性的代码。<br>还可以用 for 循环迭代字符串:</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">for</span> (c <span class="keyword">in</span> str) &#123;</span><br><span class="line">    println(c)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-不变性"><a href="#4-不变性" class="headerlink" title="4. 不变性"></a>4. 不变性</h4><p>字符串是不可变的，意思是，一旦创建字符串总是相同的。不能修改字符串的元素。因此，下面的示例不起作用：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str = <span class="string">&quot;string&quot;</span></span><br><span class="line">str[<span class="number">3</span>] = <span class="string">&#x27;o&#x27;</span> <span class="comment">// an error here!</span></span><br></pre></td></tr></table></figure>
<p>但这个工作：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> str = <span class="string">&quot;string&quot;</span></span><br><span class="line">str = <span class="string">&quot;strong&quot;</span></span><br></pre></td></tr></table></figure>
<p>实际上，我们不会修改变量中的存储值。相反，我们为它分配一个新值。因此，这是绝对合法的。这是使用字符串的方法之一。如果需要修改字符串，只需创建一个新字符串。</p>
<h4 id="5-连接字符串"><a href="#5-连接字符串" class="headerlink" title="5. 连接字符串"></a>5. 连接字符串</h4><p>可以使用运算符连接两个字符串：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str1 = <span class="string">&quot;ab&quot;</span></span><br><span class="line"><span class="keyword">val</span> str2 = <span class="string">&quot;cde&quot;</span></span><br><span class="line"><span class="keyword">val</span> result = str1 + str2 <span class="comment">// &quot;abcde&quot;</span></span><br></pre></td></tr></table></figure>
<p>当我们连接两个字符串时，将创建一个新字符串（因为字符串是不可变的）。</p>
<p>可以在同一表达式中串联多个字符串：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> firstName = <span class="string">&quot;John&quot;</span></span><br><span class="line"><span class="keyword">val</span> lastName = <span class="string">&quot;Smith&quot;</span></span><br><span class="line"><span class="keyword">val</span> fullName = firstName + <span class="string">&quot; &quot;</span> + lastName</span><br></pre></td></tr></table></figure>
<p>注意，不一样，因为串联不是换向操作（不像添加）。<br>将值追加到字符串<br>该运算符还适用于将不同类型的值附加到字符串。该值将自动转换为字符串，然后串联到目标字符串。</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str = <span class="string">&quot;abc&quot;</span> + <span class="number">10</span> + <span class="literal">true</span></span><br><span class="line">println(str) <span class="comment">// abc10true</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">val</span> code = <span class="string">&quot;123&quot;</span> + <span class="number">456</span> + <span class="string">&quot;789&quot;</span></span><br><span class="line">println(code) <span class="comment">// 123456789</span></span><br></pre></td></tr></table></figure>
<p>表达式必须始终以字符串为起点，请看下面的示例。它不工作，因为第一个操作数是一个数字：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str = <span class="number">10</span> + <span class="string">&quot;abc&quot;</span> <span class="comment">// an error here!</span></span><br></pre></td></tr></table></figure>
<p>下一个可能会令您大吃一惊：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> str = <span class="string">&quot;abc&quot;</span> + <span class="number">11</span> + <span class="number">22</span></span><br><span class="line">println(str) <span class="comment">// abc1122</span></span><br></pre></td></tr></table></figure>
<p>为什么会这样？因为首先它追加到字符串，然后追加到字符串。</p>
<h4 id="6-比较字符串"><a href="#6-比较字符串" class="headerlink" title="6. 比较字符串"></a>6. 比较字符串</h4><p>要比较两个字符串，请使用（相等）和（不等于）运算符。两个运算符都使用两个字符串作为操作数，并返回类型 （或 ） 的值。</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> first = <span class="string">&quot;first&quot;</span></span><br><span class="line"><span class="keyword">val</span> second = <span class="string">&quot;second&quot;</span></span><br><span class="line"><span class="keyword">var</span> str = <span class="string">&quot;first&quot;</span></span><br><span class="line"> </span><br><span class="line">println(first == str)  <span class="comment">// true</span></span><br><span class="line">println(first == second) <span class="comment">// false</span></span><br><span class="line">println(first != second) <span class="comment">// true</span></span><br></pre></td></tr></table></figure>
<h4 id="7-字符串模板"><a href="#7-字符串模板" class="headerlink" title="7. 字符串模板"></a>7. 字符串模板</h4><p>字符串字面值可以包含模板表达式 ，即一些小段代码，会求值并把结果合并到字符串中。 模板表达式以美元符（$）开头，由一个简单的名字构成:</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> i = <span class="number">10</span></span><br><span class="line">println(<span class="string">&quot;i = <span class="variable">$i</span>&quot;</span>) <span class="comment">// 输出“i = 10”</span></span><br></pre></td></tr></table></figure>
<p>或者用花括号括起来的任意表达式:</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> s = <span class="string">&quot;abc&quot;</span></span><br><span class="line">println(<span class="string">&quot;<span class="variable">$s</span>.length is <span class="subst">$&#123;s.length&#125;</span>&quot;</span>) <span class="comment">// 输出“abc.length is 3”</span></span><br></pre></td></tr></table></figure>
<p>原始字符串与转义字符串内部都支持模板。 如果你需要在原始字符串中表示字面值 $ 字符（它不支持反斜杠转义），你可以用下列语法：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> price = <span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string"><span class="subst">$&#123;<span class="string">&#x27;$&#x27;</span>&#125;</span>9.99</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br></pre></td></tr></table></figure>
<h4 id="8-其他"><a href="#8-其他" class="headerlink" title="8. 其他"></a>8. 其他</h4><p>原始字符串 使用三个引号（”””）分界符括起来，内部没有转义并且可以包含换行以及任何其他字符:</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> text = <span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">    for (c in &quot;foo&quot;)</span></span><br><span class="line"><span class="string">        print(c)</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br></pre></td></tr></table></figure>
<p>你可以通过 <code>trimMargin()</code> 函数去除前导空格：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">val</span> text = <span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">    |Tell me and I forget.</span></span><br><span class="line"><span class="string">    |Teach me and I remember.</span></span><br><span class="line"><span class="string">    |Involve me and I learn.</span></span><br><span class="line"><span class="string">    |(Benjamin Franklin)</span></span><br><span class="line"><span class="string">    &quot;&quot;&quot;</span>.trimMargin()</span><br></pre></td></tr></table></figure>
<p>默认 <code>|</code> 用作边界前缀，但你可以选择其他字符并作为参数传入，比如 <code>trimMargin(&quot;&gt;&quot;)</code> 。<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/moriafly/article/details/107165523">文章出处</a></p>
<p>*[文章出处]:moriafly</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/andriod/" rel="tag">andriod</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/first/" rel="tag">first</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/kotlin/" rel="tag">kotlin</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/kotlin/">kotlin</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/kotlin/kotlin-String/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="kotlin-String">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-终端机常用命令" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/%E9%9A%8F%E7%AC%94/%E7%BB%88%E7%AB%AF%E6%9C%BA%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" class="article-date">
  	<time datetime="2020-12-11T08:26:03.000Z" itemprop="datePublished">2020-12-11</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/%E9%9A%8F%E7%AC%94/%E7%BB%88%E7%AB%AF%E6%9C%BA%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/">
        终端机常用命令
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="终端机常用命令"><a href="#终端机常用命令" class="headerlink" title="终端机常用命令"></a>终端机常用命令</h1><table>
<thead>
<tr>
<th align="center">Windows</th>
<th align="center">macOS/Linux</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td align="center">cd</td>
<td align="center">cd</td>
<td>切换目录</td>
</tr>
<tr>
<td align="center">cd</td>
<td align="center">pwd</td>
<td>获取当前所在目录</td>
</tr>
<tr>
<td align="center">dir</td>
<td align="center">ls</td>
<td>列出当前的文件列表</td>
</tr>
<tr>
<td align="center">mkdir</td>
<td align="center">mkdir</td>
<td>创建新的目录</td>
</tr>
<tr>
<td align="center">无</td>
<td align="center">touch</td>
<td>创建文件</td>
</tr>
<tr>
<td align="center">copy</td>
<td align="center">cp</td>
<td>复制文件</td>
</tr>
<tr>
<td align="center">move</td>
<td align="center">mv</td>
<td>移动文件</td>
</tr>
<tr>
<td align="center">del</td>
<td align="center">rm</td>
<td>删除文件</td>
</tr>
<tr>
<td align="center">cls</td>
<td align="center">clear</td>
<td>清屏</td>
</tr>
</tbody></table>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/%E9%9A%8F%E7%AC%94/%E7%BB%88%E7%AB%AF%E6%9C%BA%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="终端机常用命令">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
    <article id="post-KotLin-包的定义与导入" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/kotlin/KotLin-%E5%8C%85%E7%9A%84%E5%AE%9A%E4%B9%89%E4%B8%8E%E5%AF%BC%E5%85%A5/" class="article-date">
  	<time datetime="2020-12-11T04:00:00.000Z" itemprop="datePublished">2020-12-11</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/kotlin/KotLin-%E5%8C%85%E7%9A%84%E5%AE%9A%E4%B9%89%E4%B8%8E%E5%AF%BC%E5%85%A5/">
        KotLin - 包的定义与导入
        
      </a>
    </h1>
  

      </header>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="KotLin-包的定义与导入"><a href="#KotLin-包的定义与导入" class="headerlink" title="KotLin - 包的定义与导入"></a>KotLin - 包的定义与导入</h1><p>包的声明应处于源⽂件顶部：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> my.demo</span><br><span class="line"><span class="keyword">import</span> kotlin.text.*</span><br><span class="line"><span class="comment">// …… </span></span><br></pre></td></tr></table></figure>
<p>⽬录与包的结构⽆需匹配：源代码可以在⽂件系统的任意位置。</p>
<h2 id="包"><a href="#包" class="headerlink" title="包"></a>包</h2><p>源⽂件通常以包声明开头：</p>
<figure class="highlight kotlin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> org.example</span><br><span class="line"><span class="function"><span class="keyword">fun</span> <span class="title">printMessage</span><span class="params">()</span></span> &#123; <span class="comment">/*……*/</span> &#125;</span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Message</span> </span>&#123; <span class="comment">/*……*/</span> &#125;</span><br><span class="line"><span class="comment">// ……</span></span><br></pre></td></tr></table></figure>
<p>源⽂件所有内容（⽆论是类还是函数）都包含在声明的包内。 所以上例中 <code>printMessage()</code> 的全名是<br><code>org.example.printMessage</code> ， ⽽ <code>Message</code> 的全名是 <code>org.example.Message</code> 。</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/moriafly/article/details/107279590">博客来自：</a>moriafly</p>

      
    </div>
    
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/andriod/" rel="tag">andriod</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/kotlin/" rel="tag">kotlin</a></li></ul>
	</div>

      
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/kotlin/">kotlin</a>
	</div>


      
        
<div class="counter-tag counter">
    <span id="/kotlin/KotLin-%E5%8C%85%E7%9A%84%E5%AE%9A%E4%B9%89%E4%B8%8E%E5%AF%BC%E5%85%A5/" class="leancloud_visitors post-title-link"
          style="font-size: 12px" data-flag-title="KotLin - 包的定义与导入">
         &nbsp;
        view
    </span>
</div>

      
      <div class="clearfix"></div>
    </div>
      
    
  </div>
  
</article>







  
  
    <nav id="page-nav">
      <a class="extend prev" rel="prev" href="/">&amp;laquo; Prev</a><a class="page-number" href="/">1</a><span class="page-number current">2</span><a class="page-number" href="/page/3/">3</a><a class="extend next" rel="next" href="/page/3/">Next &amp;raquo;</a>
    </nav>
  
</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
      <div class="footer-left">
        &copy; 2020 Kart jim
      </div>
        <div class="footer-right">
          <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/smackgg/hexo-theme-smackdown" target="_blank">Smackdown</a>
        </div>
    </div>
  </div>
</footer>
    </div>
    
  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">



<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: true,
		isPost: false,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>

<script src="/js/main.js"></script>




<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js"></script>


  </div>
</body>
</html>